﻿using System;
using System.Collections.Generic;
using System.Text;
using UtilZ.Dotnet.Ex.Attributes;

namespace UtilZ.Dotnet.Ex.ValueDescription
{
    /// <summary>
    /// 值描述组特性
    /// </summary>
    public class ValueDescriptionGroupAttribute : DisplayNameExAttribute
    {
        private Type _extendDescriptionType;
        /// <summary>
        /// 扩展描述类类型
        /// </summary>
        public Type ExtendDescriptionType
        {
            get { return _extendDescriptionType; }
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="displayName">显示文本</param>
        public ValueDescriptionGroupAttribute(string displayName)
            : this(displayName, null, null)
        {

        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="displayName">显示文本</param>
        /// <param name="extendDescriptionType">扩展描述类类型,该类型需要实现IExtendDescription接口</param>
        public ValueDescriptionGroupAttribute(string displayName, Type extendDescriptionType)
            : this(displayName, null, extendDescriptionType)
        {

        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="displayName">显示文本</param>
        /// <param name="description">描述</param>
        /// <param name="extendDescriptionType">扩展描述类类型,该类型需要实现IExtendDescription接口</param>
        public ValueDescriptionGroupAttribute(string displayName, string description, Type extendDescriptionType)
        : base(displayName, description)
        {
            this._extendDescriptionType = extendDescriptionType;
        }

    }
}
